FROM python:3.6-stretch
RUN mkdir /root/iot
COPY iot.tar /root/iot
RUN cd /root/iot && ls
RUN cd /root/iot && tar -xvf iot.tar ./
RUN cd /root/iot && pip install -r requirements.txt -i https://pypi.douban.com/simple
RUN cd /root/iot && chmod 777 ./run.sh
COPY base.py /usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py
CMD [ "/bin/sh /root/iot/run.sh" ]